{_include admin_menu}
<div class="left_content">
	<form action = "<?php echo base_url('model/add_model')?>"  id="signup-form" class="form-horizontal" method="post">
				  <legend>เพิ่มข้อมูลรุ่น</legend>

			<div class="control-group">
				<?php if(!empty($brand)) { ?> 
			    <label class="control-label" >แบรนด์</label>
			        <div class="controls"> 	
			        	<select name="brand_id">
						<?php  foreach ($brand as $value) {
							?>
					  	<option value="<?php echo $value['id']; ?>" selected="selected">
					  		<?php echo $value['name']; ?>
					  	</option>
					  	<?php  } ?>

					</select>
			     	</div>
			    <?php } // end if ?>

			</div>
			<div class="control-group">
			    <label class="control-label" >รุ่น</label>
			        <div class="controls">
			        	<input type="hidden" name="id" value="<?php if(!empty($modeledite[0]['id'])) echo $modeledite[0]['id']; ?>">
			        	<input type="text"  class="input-xlarge required" name="name" value="<?php if(!empty($modeledite[0]['name']))echo $modeledite[0]['name']; ?>"/>
			     	</div>
			</div>
			<div class="control-group">
		        <div class="controls">
		          <button type="submit" class="btn btn-primary" id="submitbtn">Submit</button>
		          <button type="reset" class="btn">Cancel</button>
		        </div>
	      </div>
	</form>
</div>